Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix search-result ssr #648

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Fix search-result ssr #648

merged 2 commits into from
Dec 7, 2023

Conversation

hiagolcm
Copy link
Contributor

@hiagolcm hiagolcm commented Dec 7, 2023

What problem is this solving?

#639 removed the ssr:false flag from the search-result that was accidentally placed after deploying the AB feature.
This PR had to be deprecated due to layout shift issues

What we didn't know is that the variant variable was obtaining different results between SSR and CSR. In SSR the value for this variable is null, but for CSR, when the sp-variant cookie does not exist, the result was an empty string

This PR removes the ssr:false flag again and corrects the divergence in the variant variable.

How to test it?

Workspace
You can disable the javaspcript from you browser in order to check the ssr rendered page.
On chrome: Open dev-tools> press cmd+shift+p > type "disable javascript"

Screenshots or example usage:

Before:
Captura de Tela 2023-12-07 às 12 12 39

Affter:

Captura de Tela 2023-12-07 às 12 12 02

@hiagolcm hiagolcm requested review from iago1501 and a team December 7, 2023 15:16
@hiagolcm hiagolcm requested a review from a team as a code owner December 7, 2023 15:16
@hiagolcm hiagolcm requested review from hellofanny and icazevedo and removed request for a team December 7, 2023 15:16
Copy link
Contributor

vtex-io-ci-cd bot commented Dec 7, 2023

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Dec 7, 2023

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

Copy link
Contributor

@iago1501 iago1501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hiagolcm hiagolcm merged commit 0b8e10b into master Dec 7, 2023
5 of 7 checks passed
@hiagolcm hiagolcm deleted the bugfix/search-result-ssr branch December 7, 2023 17:52
Copy link
Contributor

vtex-io-ci-cd bot commented Dec 7, 2023

Your PR has been merged! App is being published. 🚀
Version 3.128.0 → 3.128.1

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy [email protected]

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants